{% load static %}
{% load engine_tags %}


<div class="item droppable recipe" data-value="{{ recipe.uid }}" id="{{ recipe.id }}">


    <img class="ui mytiny rounded fancy image" src="{% img recipe %}">
    <div class="content">
            {% if project|writable:user and include_copy %}
                <div class="float-right draggable muted" >&bull;
                </div>
            {% endif %}

        <a class="subheader" href="{% url 'recipe_view' recipe.uid %}">
            {% if recipe.is_cloned %}
                <i class="linkify icon"></i>
            {% else %}
                <i class="setting icon"></i>
            {% endif %}
            {{ recipe.name }}
        </a>

        <div class="meta">
            {{ recipe.summary |markdown |truncatechars_html:100 }}
        </div>

        <div class="extra">
            <a href="{% url 'job_list' project.uid %}?filter={{ recipe.uid }}">
                <i class="bar chart icon"></i> {{ recipe.job_count }}
                result{{ recipe.job_count|pluralize }}</a>
            &bull; {% created_by date=recipe.lastedit_date user=recipe.lastedit_user %}

            {% if not recipe.runnable %}
                &bull; needs authorization
            {% endif %}

   {% if user.is_authenticated and include_copy %}
        &bull;
            <a class="ui right copy label">
                <i class="copy icon"></i>Copy
            </a>


    {% endif %}


        </div>


    </div>


</div>

<script>
    $(document).ready(function () {
        $('pre').addClass('language-bash');
        $('code').addClass('language-bash').css('padding', '0');
        Prism.highlightAll();
    });
</script>

